<template>
	<view class="ad-list-view">
		<view class="ad-list-half-view" v-for="layout in [adLeftListData, adRightListData]" :key="layout">
			<view class="ad-item-view" v-for="item in layout" :key="item.storeName">
				<image :src="item.icon"></image>
				<view class="text-store-name">{{item.storeName}}</view>
				<view class="text-tags">
					<view class="text-tag" v-for="tag in item.tags" :key="tag">{{tag}}</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				adLeftListData: [
					{
						storeName: '杭州小吃',
						tags: ['小笼包', '饭团', '饭团'],
						icon: '/static/icon/quannengbangshou.svg'
					},
					{
						storeName: '杭州小吃',
						tags: ['小笼包', '饭团','小笼包', '饭团'],
						icon: '/static/icon/quannengbangshou.svg'
					},
					{
						storeName: '杭州小吃',
						tags: ['小笼包', '饭团'],
						icon: '/static/icon/quannengbangshou.svg'
					},
					{
						storeName: '杭州小吃',
						tags: ['小笼包', '饭团', '饭团','小笼包'],
						icon: '/static/ad-bg.jpg'
					}
				],
				adRightListData: [
					{
						storeName: '杭州小吃',
						tags: ['小笼包', '饭团','小笼包', '饭团'],
						icon: '/static/icon/quannengbangshou.svg'
					},
					{
						storeName: '杭州小吃',
						tags: ['小笼包', '饭团'],
						icon: '/static/icon/quannengbangshou.svg'
					},
					{
						storeName: '杭州小吃',
						tags: ['小笼包', '饭团'],
						icon: '/static/icon/quannengbangshou.svg'
					},
					{
						storeName: '杭州小吃',
						tags: ['小笼包', '饭团', '饭团','小笼包'],
						icon: '/static/ad-bg.jpg'
					}
				]
			}
		},
		mounted() {
		}
	}
</script>

<style scoped lang="scss">
	.ad-list-view {
		width: 710rpx;
		display: flex;
		flex-wrap: wrap;
		text-align: center;
		margin-top: 20rpx;
		margin: 20rpx;
		border-radius: 20rpx;
		background-color: #ffffff;
		margin-bottom: 200rpx;
		
		.ad-list-half-view {
			width: 50%;
			
			.ad-item-view {
				width: calc(100% - 40rpx);
				padding: 20rpx;
				border: 1rpx #efefef solid;
				border-radius: 20rpx;
				// margin-bottom: 10rpx;
				
				image {
					width: 300rpx;
					height: 300rpx;
					border-radius: 20rpx;
					background-color: #ff0000;
				}
				
				.text-store-name {
					text-align: left;
				}
				
				.text-tags {
					display: flex;
					flex-wrap: wrap;
					/* flex-direction: row; */
					
					
					.text-tag {
						background-color: aqua;
						margin-right: 10rpx;
						padding: 10rpx;
						border-radius: 20rpx;
						margin-top: 10rpx;
					}
				}
			}
		}
	}
</style>